home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Canadian & World Encyclopedia 1998
/
The Canadian & World Encyclopedia 1998 - Disc 2.iso
/
mac
/
prime_CD
/
pb
/
PROFILE.DIR
/
00306_Script_helper
< prev
next >
Wrap
Text File
|
1997-07-29
|
3KB
|
105 lines
on new me
set framestack = [:]
return me
end
on plant me, chn, frm, labelTag
-- plants copies of sprite chn, frm, into chn, frm,
-- of labels containing labelTag
go frm
set theMemberNum = the memberNum of sprite chn
set theScriptNum = the scriptNum of sprite chn
set theFrameList = the labelList
delete the last char of theFrameList
set resultList = []
repeat while the number of lines in theFrameList > 0
set theLabel = line 1 of theFrameList
delete line 1 of theFrameList
go label(theLabel)
if theLabel contains labelTag then
beginrecording
set the memberNum of sprite chn = theMemberNum
set the scriptNum of sprite chn = theScriptNum
updateframe
endrecording
append resultList, theLabel
end if
end repeat
put "Frames updated:" & return & resultList
put the name of member theMemberNum && the name of member theScriptNum
return me
end
on standardizeMembs me -- set all members to something
set ttlLibs = the number of castlibs
repeat with currLib = 1 to ttlLibs
set ttlMembs = the number of members of castlib currLib
set libCount = 0
repeat with currMemb = 1 to ttlMembs
case the type of member currMemb of castlib currLib of
-- member types to catch and actions to take
#richText:
set the scrolltop of member currMemb of castlib currLib = FALSE
#field:
set the scrolltop of member currMemb of castlib currLib = FALSE
#digitalVideo:
set the pausedAtStart of member currMemb of castlib currLib = TRUE
end case
end repeat
put "Castlib" && currLib && "processed."
end repeat
return me
end
---- these set all the scripts in a range to a particular script
on scriptBlock
repeat while not (the framelabel contains "pmw")
scriptcol
end repeat
end
on scriptCol
beginrecording
repeat with i = 1 to 48
if the type of sprite i <> 0 then
set the scriptNum of sprite i to the member of member "goNextMarker" of castlib "internal"
end if
end repeat
updateframe
endrecording
end
-- gather any non-ascii chars
-- set oldDelim = the itemdelimiter
-- set the itemdelimiter = " "
-- set nonAsciiList = [:]
-- set text = the text of member currMemb of castlib currLib
-- repeat while text <> ""
-- set theLine = line 1 of text
-- repeat with ltr = 128 to 255
-- set ptr = offset(numtochar(ltr), theLine)
-- if ptr <> 0 then
-- repeat while offset(numtochar(ltr), word 1 of theLine) = 0
-- delete word 1 of theLine
-- end repeat
-- setaprop nonAsciiList, charTonum(char ptr - 1 of theLine), word 1 of theLine
-- delete word 1 of text
--
-- end if
-- end repeat
-- delete line 1 of text
--
-- end repeat
-- set the itemdelimiter = oldDelim